package com.springcloud.upms.web;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.springcloud.upms.entity.User;
import com.springcloud.upms.service.IUserService;
import com.springcloud.upms.vo.ResEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 乔鹏翔
 * @since 2019-07-15
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    IUserService userService;

    @RequestMapping(method = RequestMethod.GET)
    public ResEntity getUser(User user){
        Wrapper wrapper = new EntityWrapper();
        List<User> list = userService.selectList(wrapper);
        return ResEntity.ok(list);
    }

}
